package cn.hejiang.org.service.impl;

import cn.hejiang.basic.service.impl.BaseServiceImpl;
import cn.hejiang.org.domain.Department;
import cn.hejiang.org.mapper.DepartmentMapper;
import cn.hejiang.org.service.IDepartmentService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

@Service
@Transactional(readOnly = true, propagation = Propagation.SUPPORTS )
public class DepartmentServiceImpl extends BaseServiceImpl<Department> implements IDepartmentService {

    @Autowired
    private DepartmentMapper departmentMapper;

    // 显示所有部门
    @Override
    public List<Department> queryTree() {
        return departmentMapper.queryTree();
    }
}
